package net.thumbtack.onepm.tests;

import org.junit.Test;
import org.openqa.selenium.By;


/**
 * Created with IntelliJ IDEA.
 * User: efrolova
 * Date: 29.09.12
 * Time: 10:49
 * To change this template use File | Settings | File Templates.
 */
public class LoginAdmin extends TestBase{


    @Test
    public void LogAdmin() throws Exception{

     driver.get("http://user:thumbtack@82.200.2.19:8080");
       fillFormAdm(new Admin(AdminEmail,PasswordAd));
        driver.get(baseUrl + ":8080/login");

        Thread.sleep(1500);
        driver.get(baseUrl+":8080/users");
        driver.findElement(By.linkText("Users")).click();
        driver.findElement(By.id("filter")).clear();
        driver.findElement(By.id("filter")).sendKeys(FirstName+"@"+EmailCompany);
        driver.findElement(By.id("result")).click();
        Thread.sleep(1500);
        driver.findElement(By.cssSelector("i.icon-remove-circle")).click();
        driver.findElement(By.name("submit")).click();
    }

    }


   /* public WebClient newWebClient() {
                WebClient client = super.newWebClient(browserVersion);
                DefaultCredentialsProvider provider = new DefaultCredentialsProvider();
                provider.addCredentials(USERNAME, PASSWORD);
                client.setCredentialsProvider(provider);
                return client;

            }      */





